﻿using System;
using System.Collections.Generic;
using System.Text;
using Barbar.MapReport.DataSource.Query;

namespace Barbar.MapReport.DataSource.Facade {
  public class RegionRequestQuery : RegionRequest {
    private RegionCriteria m_Criteria;

    public RegionCriteria Criteria {
      get { return m_Criteria; }
      set { m_Criteria = value; }
    }

    internal override RegionResponse GetResponse() {
      MultipleRegionResponse response = new MultipleRegionResponse();
      foreach (Region region in DataSourceManager.GetRegions(Criteria))
        response.Regions.Add(new SimpleRegion(region));
      return response;
    }
  }
}
